package p19_动态通知调用;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
import org.springframework.context.ConfigurableApplicationContext;

/**
 * 前面将的所有通知，都是静态通知，因为每个通知方法的参数都是写死的
 */
@SpringBootApplication(exclude = DataSourceAutoConfiguration.class)
public class _1_动态通知调用 {
    public static void main(String[] args) {
        ConfigurableApplicationContext context = SpringApplication.run(_1_动态通知调用.class);
        Config.Target target = context.getBean(Config.Target.class);
        target.foo(2);
        context.close();
    }

}
